package com.none.usercenter.service;

import com.none.usercenter.model.domain.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.none.usercenter.model.domain.User;
import com.none.usercenter.model.dto.TeamQuery;
import com.none.usercenter.model.request.TeamJoinRequest;
import com.none.usercenter.model.request.TeamQuitRequest;
import com.none.usercenter.model.request.TeamUpdateRequest;
import com.none.usercenter.model.vo.TeamUserVo;

import java.util.List;

/**
* @author xiaofeng
* @description 针对表【team(队伍表)】的数据库操作Service
* @createDate 2025-11-09 20:06:42
*/
public interface TeamService extends IService<Team> {

    //创建队伍
    long addTeam(Team team, User loginUser);

    //搜索队伍
    List<TeamUserVo> listTeams(TeamQuery teamQuery,Boolean isAdmin);

    //更新队伍
    boolean updateTeam(TeamUpdateRequest teamUpdateRequest, User loginUser);

    //加入队伍
    boolean joinTeam(TeamJoinRequest teamJoinRequest, User loginUser);

    //退出队伍
    boolean quitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    //解散队伍
    boolean deleteTeam(long teamId,User loginUser);
}
